#include "lcd_extra.h"
#include "display_drv.h"
void lcd_extra_config(void)
{
    oled_write_cmd(0xfe);
    oled_write_cmd(0xef);
    // oled_write_cmd(0x36);
    // oled_write_data(0x48);
    // oled_write_cmd(0x3a);
    // oled_write_data(0x05);
    //----------------------------------Power Control Registers Initial--------------------------------//
    oled_write_cmd(0x86);
    oled_write_data(0x98);
    oled_write_cmd(0x89);
    oled_write_data(0x03);
    oled_write_cmd(0x8b);
    oled_write_data(0x80);
    oled_write_cmd(0x8d);
    oled_write_data(0x22);
    oled_write_cmd(0xe8);
    oled_write_data(0x12);
    oled_write_data(0x00);
    oled_write_cmd(0xc3);
    oled_write_data(0x27);
    oled_write_cmd(0xc4);
    oled_write_data(0x18);
    oled_write_cmd(0xc9);
    oled_write_data(0x14);
    oled_write_cmd(0xc5);
    oled_write_data(0x06);
    oled_write_cmd(0xc6);
    oled_write_data(0x1d);
    oled_write_cmd(0xc7);
    oled_write_data(0x1e);
    oled_write_cmd(0xc8);
    oled_write_data(0x0b);
    oled_write_cmd(0xff);
    oled_write_data(0x62);
    oled_write_cmd(0x99);
    oled_write_data(0x3e);
    oled_write_cmd(0x9d);
    oled_write_data(0x4b);
    oled_write_cmd(0x8e);
    oled_write_data(0x0f);
    //---------------------------------display window 240X320-------------------------------------//
    oled_write_cmd(0x2a);
    oled_write_data(0x00);
    oled_write_data(0x00);
    oled_write_data(0x00);
    oled_write_data(0Xf0);
    oled_write_cmd(0x2b);
    oled_write_data(0x00);
    oled_write_data(0x00);
    oled_write_data(0x00);
    oled_write_data(0xf0);
    oled_write_cmd(0x2c);
    //-----------------------------end display window 240X320-----------------------------------//
    //---------------------------------------- gamma setting------------------------------------------//
    oled_write_cmd(0xf0);
    oled_write_data(0x91);
    oled_write_data(0x1b);
    oled_write_data(0xa);
    oled_write_data(0x9);
    oled_write_data(0x5);
    oled_write_data(0x3f);
    oled_write_cmd(0xf1);
    oled_write_data(0x57);
    oled_write_data(0x8f);
    oled_write_data(0x8f);
    oled_write_data(0x36);
    oled_write_data(0x36);
    oled_write_data(0x7f);
    oled_write_cmd(0xf2);
    oled_write_data(0x40);
    oled_write_data(0x0);
    oled_write_data(0x9);
    oled_write_data(0x9);
    oled_write_data(0x5);
    oled_write_data(0x2b);
    oled_write_cmd(0xf3);
    oled_write_data(0x41);
    oled_write_data(0x4f);
    oled_write_data(0x6f);
    oled_write_data(0x23);
    oled_write_data(0x2f);
    oled_write_data(0x9f);
}
